<%@ page language="java" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


<title>My JSP 'register.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>


<body>
	<form id="form1" name="registerform" action="register" method="post">
		<P>&nbsp;注册</P>
		<P>
			用户名： <input type="text" id="username" name="username"> <label
				id="userlabel" for="username">不能为空</label>
		</P>
		<P>
			&nbsp;性别：<input type="radio" checked="checked" value="男" name="sex">男
			<input type="radio" value="女" name="sex">女
		</P>
		<p>
			&nbsp; <input id="test1" type="button" value="注册"/>
			
		</p>
	</form>

	<script type="text/javascript" src="jquery-1.9.1.js">
	</script>

	<script type="text/javascript">
	$("#username").blur(function() {
		$("#userlabel").load("/JSPLecture/check",$("#form1").serializeArray());
		
		/* $.get("/JSPLecture/check" , $("#form1").serializeArray() , 
		//指定回调函数
		function(data , statusText)
		{
			$("#userlabel").empty();
			$("#userlabel").append(data);
			//alert(data);
		},
		//指定服务器响应为html
		"html"
		); */
	});
			
	</script>



</body>



</html>